* cursor is hovering on top of a widget.
*
* Since: 2.12
+ *
+ * Deprecated: 3.10: This setting is ignored.
*/
result = settings_install_property_parser (class,
g_param_spec_int ("gtk-tooltip-timeout",
* for the new object.
*
* Since: 2.12
+ *
+ * Deprecated: 3.10: This setting is ignored.
*/
result = settings_install_property_parser (class,
g_param_spec_int ("gtk-tooltip-browse-timeout",
* about browse mode.
*
* Since: 2.12
+ *
+ * Deprecated: 3.10: This setting is ignored.
*/
result = settings_install_property_parser (class,
g_param_spec_int ("gtk-tooltip-browse-mode-timeout",
* @keyboard_mode: %TRUE if the tooltip was trigged using the keyboard
* @tooltip: a #GtkTooltip
*
- * Emitted when the #GtkSettings:gtk-tooltip-timeout has expired with the
+ * Emitted when the hover timeout has expired with the
* cursor hovering above @status_icon; or emitted when @status_icon got
* focus in keyboard mode.
*
#undef DEBUG_TOOLTIP
+#define HOVER_TIMEOUT 500
+#define BROWSE_TIMEOUT 60
+#define BROWSE_DISABLE_TIMEOUT 500
#define GTK_TOOLTIP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOLTIP, GtkTooltipClass))
#define GTK_IS_TOOLTIP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOOLTIP))
if (!tooltip->keyboard_mode_enabled)
{
- guint timeout;
- GtkSettings *settings;
-
- settings = gtk_widget_get_settings (GTK_WIDGET (tooltip->window));
-
- g_object_get (settings,
- "gtk-tooltip-browse-mode-timeout", &timeout,
- NULL);
+ guint timeout = BROWSE_DISABLE_TIMEOUT;
/* The tooltip is gone, after (by default, should be configurable) 500ms
* we want to turn off browse mode
{
guint timeout;
GtkTooltip *tooltip;
- GtkSettings *settings;
tooltip = g_object_get_data (G_OBJECT (display),
"gdk-display-current-tooltip");
if (tooltip->timeout_id)
g_source_remove (tooltip->timeout_id);
- settings = gtk_widget_get_settings (GTK_WIDGET (tooltip->window));
-
if (tooltip->browse_mode_enabled)
- g_object_get (settings, "gtk-tooltip-browse-timeout", &timeout, NULL);
+ timeout = BROWSE_TIMEOUT;
else
- g_object_get (settings, "gtk-tooltip-timeout", &timeout, NULL);
+ timeout = HOVER_TIMEOUT;
tooltip->timeout_id = gdk_threads_add_timeout_full (0, timeout,
tooltip_popup_timeout,
* @keyboard_mode: %TRUE if the tooltip was trigged using the keyboard
* @tooltip: a #GtkTooltip
*
- * Emitted when #GtkWidget:has-tooltip is %TRUE and the #GtkSettings:gtk-tooltip-timeout
+ * Emitted when #GtkWidget:has-tooltip is %TRUE and the hover timeout
* has expired with the cursor hovering "above" @widget; or emitted when @widget got
* focus in keyboard mode.
*